{% extends 'SystemAdminBundle:base:main.content.lists.div.html.twig' %}
{% block options %}
{% endblock %}
{% block tableHead %}
    <tr>
        <th width="6%">选择</th>
        <th align="left">分类</th>
        <th align="left" width="10%">level</th>
        <th align="left" width="10%">图标</th>
        <th align="left" width="10%">链接</th>
        <th align="left" width="10%">排序</th>
        <th align="center" width="5%">管理</th>
    </tr>
{% endblock %}
{% block tableList %}
    {% for Entity in lists %}
        <tr>
            <td align="center">
                <span class="checkall" style="vertical-align:middle;">
                    <input type="checkbox" name="ids[]" value="{{ Entity.MessageCategory_id }}"/>
                </span>
            </td>
            <td align="left">
                {% if Entity.MessageCategory_level > 0 %}{% for i in 0..Entity.MessageCategory_level %}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{% endfor %}├{% for i in 0..Entity.MessageCategory_level %}─{% endfor %}{% endif %}
                {{ Entity.MessageCategory_name }}
            </td>
            <td align="left">{{ Entity.MessageCategory_level }}</td>
            <td align="left">
                {% if Entity.MessageCategory_pic %}<img src="{{ Entity.MessageCategory_pic }}" width="20" height="20"/>{% endif %}
            </td>
            <td align="left">
                <input
                        id="val_link_{{ Entity.MessageCategory_id }}"
                        type="text" value="{{ Entity.MessageCategory_link }}"
                        class="sort"
                        onkeydown="return checkNumber(event);"
                        onblur="__doPostBack('setAttr','id={{ Entity.MessageCategory_id }}&link='+ $('#val_link_{{ Entity.MessageCategory_id }}').val())"
                        >
            </td>
            <td align="left">
                <input
                        id="val_{{ Entity.MessageCategory_id }}"
                        type="text" value="{{ Entity.MessageCategory_orders }}"
                        class="sort"
                        onkeydown="return checkNumber(event);"
                        onblur="__doPostBack('setAttr','id={{ Entity.MessageCategory_id }}&orders='+ $('#val_{{ Entity.MessageCategory_id }}').val())"
                        >
            </td>
            <td align="center">
                <a href="{{ path("MessageCategoryPreAdd") }}?parent={{ Entity.MessageCategory_id }}" class="icon-btn add"><i></i></a>
                <a href="{{ path("MessageCategoryPreEdit",{'id':Entity.MessageCategory_id}) }}" class="img-btn edit"></a>
            </td>
        </tr>
    {% endfor %}
{% endblock %}
{% block script %}
{% endblock %}

